home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-08 | 42.8 KB | 969 lines | [TEXT/R*ch] |
- C.S.M.P. Digest Sat, 11 Jul 92 Volume 1 : Issue 137
-
- Today's Topics:
-
- Multi-channel synchronized sound
- Pricing of Mac vs Windows development environments
- Space/CheckMark in scroll area
- Is This PostScript ?!
- TCL and Apple Events & aevt rsrc format
- asynchronous XCMDs?
- cmarker for think C 5.0
-
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- The digest is a collection of article threads from the internet newsgroup
- comp.sys.mac.programmer. It is designed for people who read c.s.m.p. semi-
- regularly and want an archive of the discussions. If you don't know what a
- newsgroup is, you probably don't have access to it. Ask your systems
- administrator(s) for details. (This means you can't post questions to the
- digest.)
-
- Each issue of the digest contains one or more sets of articles (called
- threads), with each set corresponding to a 'discussion' of a particular
- subject. The articles are not edited; all articles included in this digest
- are in their original posted form (as received by our news server at
- cs.uoregon.edu). Article threads are not added to the digest until the last
- article added to the thread is at least one month old (this is to ensure that
- the thread is dead before adding it to the digest). Article threads that
- consist of only one message are generally not included in the digest.
-
- The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
- [128.223.8.8] in the directory /pub/mac/csmp-digest. The most recent issues
- are available from sumex-aim.stanford.edu [36.44.0.6] in the directory
- /info-mac/digest/csmp. If you don't have ftp capability, the sumex archive
- has a mail server; send a message with the text '$MACarch help' (no quotes)
- to LISTSERV@ricevm1.rice.edu for more information.
-
- These digest is also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new issue as it is created. Sorry, back issues
- are not available through the mailing list.
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
-
- -------------------------------------------------------
-
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Subject: Multi-channel synchronized sound
- Date: 9 Jun 92 13:45:24 +1200
- Organization: University of Waikato, Hamilton, New Zealand
-
- I've been doing a bit of investigation into the problem of playing multiple
- simultaneous channels of sound, while keeping the notes synchronized. It
- turns out it's not that hard--provided you keep in mind the limitations
- of the particular machine you're running on.
-
- The basic technique is to start off all the channels simultaneously, and
- make sure the sound channel queues never become empty thereafter. So long
- as you ensure this, and calculate all your note and rest durations correctly,
- you can run for quite a long time without any drift effects.
-
- To start off the channels simultaneously, Jim Reekes' SoundApp example sends
- a syncCmd to each channel with SndDoImmediate. The technique I came up with
- involves sending a pauseCmd to each channel with SndDoImmediate, then queueing
- up some commands in each channel with SndDoCommand, then starting them all off
- by sending resumeCmd commands with SndDoImmediate. Either one seems to work
- fine.
-
- The other problem I thought about was that of accumulated drift after the
- channels have been playing for some time. The good news is that the effect
- is mostly insignificant, but the bad news is that when it shows up, it shows
- up in a big way. That is, you don't get a slow accumulation of drift errors;
- instead, things fall apart fairly suddenly.
-
- I did some tests with the wave table synthesizer. I came up with a simple
- "stress test", which involved repeatedly sounding a chord (a note on each
- channel simultaneously) for half a second, alternating with silence on all
- channels for half a second. I ran this test with 3 and with 4 channels, on
- an LC, an SE and a IIfx. All machines were running System 7 (I know the wave
- table synthesizer doesn't work on an LC running 6.0.7).
-
- On the LC, 3 simultaneous wave table channels would stay in sync perfectly
- for quite a long while. I ran the test once for about half an hour before
- a perceptible delay suddenly appeared in one channel. The second time I
- tried the same test, it went for over an hour and a quarter without developing
- any perceptible drift, before I stopped it to keep from going batty...
-
- Four channels didn't work so well. The LC would run for about 15 to 20
- seconds before the synchronization fell apart completely--the crisp chord
- would turn into a leisurely arpeggio, with the notes sounding in sequence
- rather than together.
-
- The SE was worse. Both the 3-channel and the 4-channel test fell part
- within a few seconds. I haven't tried the IIfx for more than a couple of
- minutes at a time, but that one works fine with both tests. I suspect the
- same would be true of other models with a genuine Apple Sound Chip, rather
- than the imitation in the LC and the Classic II.
-
- The interesting thing was, I got better results playing an actual 3- or
- 4-part tune, where various channels would pause or rest frequently, than I
- did with my stress test. The SE had no problem playing a 3-part tune, though
- the 4-part one wasn't very successful. And the LC would play even the 4-part
- tune without any problems, even though it goes for rather longer than the
- 4-channel stress test.
-
- I then considered the problem of pulling drifting channels into sync. One
- of the first things I discovered is that the syncCmd command is useless for
- this purpose. In order to use it, you have to feed it to each channel with
- a different value for the count, and make sure that the one with the highest
- count is processed first, then the one with the next-highest count, and so on.
- This is no good if you don't know which way your channels are going to drift!
-
- The solution I came up with involved installing a special callback routine
- into each channel. I would create a structure containing a list of the
- channels to be synchronized, together with a count of those for which the
- callback routine hasn't been called yet; then I would queue a callbackCmd
- command into each of those channels, at the point in the respective command
- streams that I want to be synchronized.
-
- Each time the callback routine is entered, it decrements the count in
- the common structure. If the count isn't zero, then it suspends its channel
- (by sending a pauseCmd with SndDoImmediate). If the count is zero, then
- it goes through the list of channels and sends each one a resumeCmd with
- SndDoImmediate. Thus all the callback calls except the last one suspend
- their respective channels, while the last one restarts them all.
-
- I'm pretty sure this code works, because I can introduce intentional audible
- discrepancies (both big and small) into the note timings on various channels,
- and they disappear on reaching the synchronization point. Yet when I try to
- use it to overcome the major synchronization problems I described above, it
- makes no difference at all--on the LC, things fall apart just as quickly,
- and just as badly.
-
- This, together with the fact that the onset of loss of synchronization is
- quite sudden, rather than building up gradually, leads me to conclude that
- these synchronization problems are due to bugs in the Sound Manager.
-
- If anybody wants, I can e-mail them a HyperCard stack (about 54K) in size
- that they can use to investigate for themselves. It contains a set of HyperCard
- externals I wrote for allocating multiple sound channels and feeding commands
- to them. It also implements the callback synchronization technique in an
- easy-to-use form.
-
- Lawrence D'Oliveiro fone: +64-7-856-2889
- Computer Services Dept fax: +64-7-838-4066
- University of Waikato electric mail: ldo@waikato.ac.nz
- Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
-
- ---------------------------
-
- From: nagle@netcom.com (John Nagle)
- Subject: Pricing of Mac vs Windows development environments
- Date: 5 Jun 92 05:35:59 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
-
-
- Apple, as we all know, just raised the price on ETO to $1250 or so.
- Now, Microsoft has also made a price move. In the other direction.
- I just received an ad for Microsoft's C/C++ environment. This
- includes C,C++, windows SDK, Dialog Editor, Image Editor, Font Editor,
- 75,000 lines of sample code, stress testing package, Help Compiler,
- CodeView debugger, and a source profiler, plus online documentation.
- Some manuals, too. (About 9" or so worth, it looks like. A full manual
- set of 4,000 pages is available separately for $150).
-
- The price is $139 until June 30. That's right, only $139, about
- 1/10th of what Apple charges.
-
- Does Apple yet perceive that they might have a problem?
-
- John Nagle
-
- ps: (Microsoft is at 1-800-992-3675, ext. "NQ5").
-
- +++++++++++++++++++++++++++
-
- From: potts@itl.itd.umich.edu (Paul Potts)
- Organization: Instructional Technology Laboratory, University of Michigan
- Date: Fri, 5 Jun 92 13:59:09 GMT
-
- In article <#l#l0--.nagle@netcom.com> nagle@netcom.com (John Nagle) writes:
- >
- > Apple, as we all know, just raised the price on ETO to $1250 or so.
- >Now, Microsoft has also made a price move. In the other direction.
- >I just received an ad for Microsoft's C/C++ environment. This
- >includes C,C++, windows SDK, Dialog Editor, Image Editor, Font Editor,
- >75,000 lines of sample code, stress testing package, Help Compiler,
- >CodeView debugger, and a source profiler, plus online documentation.
- >Some manuals, too. (About 9" or so worth, it looks like. A full manual
- >set of 4,000 pages is available separately for $150).
- >
- > The price is $139 until June 30. That's right, only $139, about
- >1/10th of what Apple charges.
- >
-
- No, it's not. The $139 price is the "competitive upgrade." You have to return
- to Microsoft a master disk or a page from your manual for a competing product.
- I purchased the Borland C++ 3.0 package (list price about $495) for $359, and
- got the competitive upgrade for $139. The additional manuals (really a
- necessity if you are going to do Windows programming cost $150). So, the
- complete package runs around $648 to get both packages. If you want to buy
- the Microsoft development system alone it is $349 from the Programmer's shop.
-
- Yes, these packages are both good deals. However, having used both, I don't
- believe they are the equivalent of ETO. The price war for Windows/DOS
- development tools is becoming quite intense, and the tools are becoming
- better - both C++ compilers are excellent, although I am leaning towards
- the Borland C++ IDE. Maybe when there are as many Apple machines (or Power
- PCs) as DOS machines out there, there will be as much competition and
- price-cutting in developent environments.
-
- By the way, these *are* PC packages: The Borland C++ IDE freezes when I try
- to use my Acer mouse; the Microsoft package bombs when run under DOS using
- HIMEM.SYS and EMM386, but requires 386MAX, which crashes the Borland C++ IDE;
- there is a bomb when I try to run the Borland C++ IDE under Windows 3.1 using
- my Logitech trackball; my Stealth VRAM video card does an incredible monitor-
- blowing flicker and jig when swapping between video modes under the Microsoft
- PWB... I *was* able to come up with configurations that are stable for each
- product, but keep in mind these are not Macintosh programs, nor is Windows
- and DOS the Mac OS. Just thought I'd mention that, because I often hear things
- like "how come I can get a 16 MHz 486 machine with a 19" color monitor and
- a 400 meg hard drive for $900 when a Mac Plus costs four thousand dollars?"
- Don't get me wrong - I think these tools are a good deal, or I wouldn't have
- bought both of them, but given my preference I would be running a fast
- C++ compiler on a Mac instead. (If there was one...).
-
- - --
- The essence of OOP: "With all this horse manure, I know there's got to be
- a pony in here somewhere!"
- Paul R. Potts, Software Designer --- potts@itl.itd.umich.edu <--- me!
-
- +++++++++++++++++++++++++++
-
- From: nagle@netcom.com (John Nagle)
- Date: Sun, 07 Jun 92 03:57:58 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
-
- potts@itl.itd.umich.edu (Paul Potts) writes:
-
- >No, it's not. The $139 price is the "competitive upgrade." You have to return
- >to Microsoft a master disk or a page from your manual for a competing product.
-
- No, Microsoft has dropped that requirement, according to the
- brochure they sent me. This is a sale, through June 30, for $139,
- plus sales tax, plus $20 "freight" (it's a big box).
-
- I don't know whether it's any good, but it's big and cheap.
-
- John Nagle
-
- +++++++++++++++++++++++++++
-
- From: potts@itl.itd.umich.edu (Paul Potts)
- Organization: Instructional Technology Laboratory, University of Michigan
- Date: Mon, 8 Jun 92 13:44:11 GMT
-
- In article <dh+lyd#.nagle@netcom.com> nagle@netcom.com (John Nagle) writes:
- >potts@itl.itd.umich.edu (Paul Potts) writes:
- >
- >>No, it's not. The $139 price is the "competitive upgrade." You have to return
- >>to Microsoft a master disk or a page from your manual for a competing product.
- >
- > No, Microsoft has dropped that requirement, according to the
- >brochure they sent me. This is a sale, through June 30, for $139,
- >plus sales tax, plus $20 "freight" (it's a big box).
-
- Wow! OK, that's cheap. You will definitely want the $150 set of additional
- documentation, if you are planning on doing any Windows programming.
-
- Anyone else who has looked at the package care to do a comparison/contrast?
- - --
- The essence of OOP: "With all this horse manure, I know there's got to be
- a pony in here somewhere!"
- Paul R. Potts, Software Designer --- potts@itl.itd.umich.edu <--- me!
-
- +++++++++++++++++++++++++++
-
- From: Adrian C Ruigrok
- Organization: Bell-Northern Research
- Date: Mon, 8 Jun 1992 13:54:43 GMT
-
- In article <dh+lyd#.nagle@netcom.com> nagle@netcom.com (John Nagle) writes:
- >potts@itl.itd.umich.edu (Paul Potts) writes:
- >
- >>No, it's not. The $139 price is the "competitive upgrade." You have to return
- >>to Microsoft a master disk or a page from your manual for a competing
- product.
- >
- > No, Microsoft has dropped that requirement, according to the
- >brochure they sent me. This is a sale, through June 30, for $139,
- >plus sales tax, plus $20 "freight" (it's a big box).
- I remain sceptical of the price... Microsoft's only purpose in life is to make
- money.
-
- > I don't know whether it's any good, but it's big and cheap.
- >
-
- But look what you get from Apple.
- I don't know that I could argue that you are getting 10x as much, especially
- since I don't have any idea what is in the Microsoft product, but with ETO you
- do get a complete, very mature, application framework, 4 ~quarterly updates
- (plus or minus a few months) any many other tools. Would not Microsoft soak
- you again in a few months for another $139 for yet another update? They do it
- for everything else!
-
- Besides, $139 only buys you a lot of headaches ;-)
- Adrian
-
- ---------------------------
-
- From: mds@bnr.ca (Anthony VanAlphen)
- Subject: Space/CheckMark in scroll area
- Date: 5 Jun 92 13:49:56 GMT
- Organization: bnr
-
- While trying to get a check mark into a scroll area we've discovered that the size
- of a check is not the same size as a space! We've already tried a non-breaking space.
- One alternative is a fixed width font, but the check is available only in the system
- font Chicago.
-
- Is there a trick? We *KNOW* this is possible. BTW we are using MPW C and Prototyper.
- - --
- Marty Sells Phone: (613)-829-5606 (home) My opinions are my own,
- mds@bnr.ca (613)-763-4485 (work) not those of by employer..
-
- +++++++++++++++++++++++++++
-
- From: jpurlia@qualcomm.com (John Purlia)
- Date: 8 Jun 92 21:07:56 GMT
- Organization: Qualcomm Incorporated
-
- In article <1992Jun5.134956.13474@bcrka451.bnr.ca>, mds@bnr.ca (Anthony VanAlphen) writes:
- >
- > While trying to get a check mark into a scroll area we've discovered that the size
- > of a check is not the same size as a space! We've already tried a non-breaking space.
- > One alternative is a fixed width font, but the check is available only in the system
- > font Chicago.
- >
- > Is there a trick? We *KNOW* this is possible. BTW we are using MPW C and Prototyper.
-
- Just write an LDEF that draws the check, then moves the pen to the horizontal
- position at which you wish to draw the text. Really, an LDEF is one of the
- simpler defprocs to create, requvery little overhead, and allows you to truly
- customize the appearance of your cell data.
-
- - -- John Purlia
- ..........................................................................
- John Purlia : My brain; not my company's brain. My brain says...
- jpurlia@qualcomm.com : "Just about any movie could be made better
- AppleLink: AM0470 : if one of the characters were a vampire."
- ..........................................................................
-
- ---------------------------
-
- From: ewylie@ocf.berkeley.edu (Elizabeth Wylie)
- Subject: Is This PostScript ?!
- Date: 7 Jun 92 06:18:52 GMT
- Organization: U. C. Berkeley Open Computing Facility
-
- Newsgroups: comp.mac.sys.programmer
- Subject: Is this PostScript ?!
- Summary:
- Followup-To:
- Distribution: world
- Organization: U. C. Berkeley Open Computing Facility
- Keywords:
-
- I am trying to determine whether a particular font (given a font name and
- number) has a PostScript counterpart that will be handled by ATM. I've
- been told that ATM has some callback routines that would help me out,
- but I don't know what these routines are.
-
- Does anyone know of these routines or have another way of determining
- whether a PS font will be drawn using PS on the screen?
-
- Any pointers would be much appreciated.
-
- - -Elizabeth Wylie
- ewylie@ocf.berkeley.edu
- ~?
-
- Newsgroups: comp.sys.mac.programmer
- Subject: Is this PostScript?!
- Summary:
- Followup-To:
- Distribution: world
- Organization: U. C. Berkeley Open Computing Facility
- Keywords:
-
- +++++++++++++++++++++++++++
-
- From: lim@iris.ucdavis.edu (Lloyd Lim)
- Date: 8 Jun 92 16:20:56 GMT
- Organization: U.C. Davis - Department of Computer Science
-
- In article <10s9ocINNdd2@agate.berkeley.edu> ewylie@ocf.berkeley.edu (Elizabeth Wylie) writes:
- >
- >I am trying to determine whether a particular font (given a font name and
- >number) has a PostScript counterpart that will be handled by ATM. I've
- >been told that ATM has some callback routines that would help me out,
- >but I don't know what these routines are.
- >
- >Does anyone know of these routines or have another way of determining
- >whether a PS font will be drawn using PS on the screen?
-
- Yes, the procedure is named fontAvailableATM. It's not hard but it's
- a bit long to describe here. You can call Adobe Developer Support
- (415-961-4111) an ask for the second ATM tech note ("Advanced Type
- Capabilities Using Adobe Type Manager on the Macintosh") and they'll
- send it to you for free. The note includes sample code. I think you
- might even be able to get a disk with C files on it.
-
- +++
- Lloyd Lim Internet: lim@cs.ucdavis.edu
- 224 Lysle Leach Hall America Online: LimUnltd
- U.C. Davis AppleLink: LimUnltd
- Davis, CA 95616 CompuServe: 72647,660
-
- ---------------------------
-
- From: montford@ukfca1 (Piran Montford)
- Subject: TCL and Apple Events & aevt rsrc format
- Date: 8 Jun 92 07:57:52 GMT
- Organization: Schlumberger Technologies, Board Test, Ferndown, England
-
- I'm sorry, this is a rather ill researched question, but I'm loosing my
- news access soon, and I'd like this question discussed before I start my
- final year project for my degree course:
-
- What I want to know about is writing an apple-event driven program with
- the TCL class library. The question is, once I get a command, should I turn
- that into an apple-event, receive that, and then turn that into a CTask, or
- should I generate the CTask, which then sends apple-events that I then execute?
- How does this effect undoing, and the recording of apple-events?
-
- command -> apple-event -> CTask OR command -> CTask -> apple-event
-
- Any pointers, handles, or even help, would be greatefully received.
-
- Also, could someone mail me with the aevt resource description, or even
- where I could get it. Don't say develop coz I aint got it, and no 640MB of
- space to unpack the stuff from apple.com.
-
- BCNU, Piran.
-
- P.D.N.A.A.R.O.D.D.Montford, montford@uk.ate.slb.com, (JUST A STUDENT HERE)
- Soon to be pdnm@vms.bton.ac.uk. Goons, Prisoner, Pooh Bear, I just love 'em.
- You wanna disclaimer? Use your own. I'm being paid to do other things...
-
- +++++++++++++++++++++++++++
-
- From: molla@paone.uucp (Levent Mollamustafaoglu)
- Date: 8 Jun 92 16:32:26 GMT
- Organization: Aiken Computation Lab, Harvard University
-
- In article <512@catnip.UUCP> montford@ukfca1 (Piran Montford) writes:
- >I'm sorry, this is a rather ill researched question, but I'm loosing my
- >news access soon, and I'd like this question discussed before I start my
- >final year project for my degree course:
- >
- >What I want to know about is writing an apple-event driven program with
- >the TCL class library. The question is, once I get a command, should I turn
- >that into an apple-event, receive that, and then turn that into a CTask, or
- >should I generate the CTask, which then sends apple-events that I then execute?
- >How does this effect undoing, and the recording of apple-events?
- >
- >command -> apple-event -> CTask OR command -> CTask -> apple-event
- >
- >Any pointers, handles, or even help, would be greatefully received.
- >
-
- As far as I've seen from looking at the Apple event support in TCL,
- the CSwitchboard object catches incoming Apple events and wraps them
- up in a CAppleEvent object for you. The CApplication object handles
- the four required Apple events for you (Open Doc etc.). If you want
- to handle other Apple events, then your subclass for CApplication
- should override the DOAppleEvent method to add statements for those.
- Note that these other Apple events will be wrapped in CAppleEvent
- objects for you. The only thing you should do is write the methods
- to handle them.
-
- As to sending Apple events, it is more complicated. TCL does not have
- support (at least in a clever OOP way) for sending Apple events.
- Just to give an example, you can not set the target application
- anywhere in CAppleEvent, since it handles only incmoing events
- (which automatically have the reply information). What you can do is
- write a new type of Apple event class that handles outgoing events,
- and maybe you can handle undo and other details that way.
-
- This might be obscure, but there is as yet very little sample code
- or reusable classes for wide Apple event support. (Maybe that's why
- most applications only support the required Apple events and
- possibly publish-subscribe :-) )
-
-
- ===========================================================================
- Dr. Levent Mollamustafaoglu Harvard University
- molla@paone.harvard.edu molla@metatron.harvard.edu
- ===========================================================================
-
- ---------------------------
-
- From: taihou@chromium.iss.nus.sg (Tng Tai Hou)
- Subject: asynchronous XCMDs?
- Organization: Institute of Systems Science, NUS, Singapore
- Date: Thu, 4 Jun 1992 09:04:57 GMT
-
- I need to write an XCMD for SuperCard/HyperCard that is
- asynchronous. In SoundEdit Pro's Fplay, which is a substitute
- play command for Hypercard, it can play sound files of its own
- formats and return without the sound stopping: the sound
- channel is still active, as is the code resource, since
- a stop command can be sent to Fplay to stop that sound.
-
- Can someone kindly explain how this is done? How can I reference
- any memory space allocated by an XCMD again? In this case, a sound
- channel, which is handle to a sound resource.
-
- Thanks.
-
- Tai Hou
- Singapore
-
- +++++++++++++++++++++++++++
-
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Date: 9 Jun 92 10:31:47 +1200
- Organization: University of Waikato, Hamilton, New Zealand
-
- In article <1992Jun4.090457.18584@nuscc.nus.sg>, taihou@chromium.iss.nus.sg (Tng Tai Hou) writes:
- > I need to write an XCMD for SuperCard/HyperCard that is
- > asynchronous. In SoundEdit Pro's Fplay, which is a substitute
- > play command for Hypercard, it can play sound files of its own
- > formats and return without the sound stopping: the sound
- > channel is still active, as is the code resource, since
- > a stop command can be sent to Fplay to stop that sound.
-
- There are several different ways to keep things in memory in-between
- calls to a HyperCard external. One way is to use a global variable (and
- hope that its name doesn't clash with anything else). Or you could load
- something into the system heap and install a Gestalt selector to refer to it
- (unfortunately Gestalt selectors can't point to things in the application
- heap). You could poke an address into your XCMD or XFCN resource, but I
- personally wouldn't trust that as a very reliable technique.
-
- HyperCard 2.x offers another technique: create an external window ("xwindow")
- and stick a pointer to your storage in its refcon field. If you make this an
- invisible window, the user never has to be aware that it is there. It is even
- possible to find the xwindow again on a subsequent call without having to store
- a pointer to it in some other global location (e-mail me for details about
- this technique). And with HyperCard 2.1, you can refer to the window by ID,
- so you don't have to worry about giving it a unique name.
-
- Lawrence D'Oliveiro fone: +64-7-856-2889
- Computer Services Dept fax: +64-7-838-4066
- University of Waikato electric mail: ldo@waikato.ac.nz
- Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
-
- +++++++++++++++++++++++++++
-
- From: potts@itl.itd.umich.edu (Paul Potts)
- Date: 9 Jun 92 12:59:13 GMT
- Organization: Instructional Technology Laboratory, University of Michigan
-
- In article <1992Jun9.103147.8511@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
- >In article <1992Jun4.090457.18584@nuscc.nus.sg>, taihou@chromium.iss.nus.sg (Tng Tai Hou) writes:
- >> I need to write an XCMD for SuperCard/HyperCard that is
- >> asynchronous. In SoundEdit Pro's Fplay, which is a substitute
- >> play command for Hypercard, it can play sound files of its own
- >> formats and return without the sound stopping: the sound
- >> channel is still active, as is the code resource, since
- >> a stop command can be sent to Fplay to stop that sound.
- >
- >There are several different ways to keep things in memory in-between
- >calls to a HyperCard external. One way is to use a global variable (and
- >hope that its name doesn't clash with anything else). Or you could load
- >something into the system heap and install a Gestalt selector to refer to it
- >(unfortunately Gestalt selectors can't point to things in the application
- >heap). You could poke an address into your XCMD or XFCN resource, but I
- >personally wouldn't trust that as a very reliable technique.
- >
- >HyperCard 2.x offers another technique: create an external window ("xwindow")
- >and stick a pointer to your storage in its refcon field.
- ...
-
- It is also possible to have your XCMD/XFCN lock itself on the heap and keep
- a record of its state. This is somewhat more memory-intensive for a large
- XCMD/XFCN but it is the technique that I use. I've never had any problems
- with this technique except for a compatibility problem with an old RadiusWare
- INIT which put a non-relocatable block right on top of Hypercard's window
- data, making it non-resizable. The only caveat is that if you open a second
- stack, the XCMD will be purged even though it is locked. This would probably
- cause a crash if an asynch sound was playing, since the callback routine
- would be wiped out. However, if your stack can prevent the user from opening
- another stack it should be safe.
-
- My XFCN is pretty robust and does thorough error-checking; I've been using
- it for over a year now and don't see any hangs or crashes. I haven't
- worked on it for awhile, though. I know I was experimenting with asynch sound
- but I can't remember if I got it working in the XFCN. If you are interested
- in "borrowing" the XFCN let me know via mail.
-
- I know that the self-locking XFCN is probably a bad idea as far as being
- friendly to other applications and to Hypercard, but it works... right now,
- none of my sets of calls to the XFCN exceed the bounds of a single script
- handler; that is, the XFCN never is locked for longer than it takes to
- finish executing a single mouseUp handler. Supporting asynch sound changes
- this some, so it will have to be tested thoroughly under these conditions.
-
- - --
- The essence of OOP: "With all this horse manure, I know there's got to be
- a pony in here somewhere!"
- Paul R. Potts, Software Designer --- potts@itl.itd.umich.edu <--- me!
-
- ---------------------------
-
- From: francois@welchgate.welch.jhu.edu (Francois Schiettecatte)
- Subject: cmarker for think C 5.0
- Organization: Johns Hopkins Univ. Welch Medical Library
- Date: Sat, 6 Jun 1992 18:06:26 GMT
-
- I have seen a very useful utility for think C 4.0.x called
- CMarker, it puts an extra icon up on the menu bar of an
- editing window and allows you to scroll down to functions
- very quickly. I have not gotten it to work for think C 5.0.x.
- Does anyone know how I could get it to work with 5.0.x or
- is there a newer version which does.
-
- thanks
-
-
-
- francois
-
-
- Francois Schiettecatte
- Software Engineer
- Welch Medical Library
- Johns Hopkins University
- Internet: francois@library.welch.jhu.edu
- Phone : (410) 955-7581
-
-
- +++++++++++++++++++++++++++
-
- From: mspace@netcom.com (Brian Hall)
- Date: Sat, 06 Jun 92 20:22:20 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
-
- francois@welchgate.welch.jhu.edu (Francois Schiettecatte) writes:
-
- >I have seen a very useful utility for think C 4.0.x called
- >CMarker, it puts an extra icon up on the menu bar of an
- >editing window and allows you to scroll down to functions
- >very quickly. I have not gotten it to work for think C 5.0.x.
- >Does anyone know how I could get it to work with 5.0.x or
- >is there a newer version which does.
-
- I got it to "work" (see below) in Think C 5.x by installing it into 5.0
- and then performing the 5.0->5.x updates. It would not install directly
- into 5.0.2. It mostly works, but seems to have trouble with the new
- C++ style comments "//". If you avoid them, you are fine.
-
- Another alternative I suggest you look into is PopupFuncs. It works with
- Think C 5.0 just fine, and does MPW Pascal, C, C++, and Rez as well. I
- believe there is a special for users of the ShareWare BBEdit for $30,
- contact the author of PUF at one of:
-
- AOL: ESLOSSER, SLOSSER
- AppleLink: D3979
- slosser@mindseye.berkeley.edu
-
- >From a user of both CMarker and PUF:
-
- - --
-
- \ | / | Brian Hall mspace@netcom.com
- - : - | Mark/Space Softworks Applelink: markspace
- /|\ | America Online: MarkSpace
- |-+-| |
- /-\|/-\ | People don't kill people, toasters kill people.
-
- +++++++++++++++++++++++++++
-
- From: siegel@world.std.com (Rich Siegel)
- Date: 6 Jun 92 21:17:53 GMT
- Organization: GCC Technologies
-
- In article <f!+ldwr.mspace@netcom.com> mspace@netcom.com (Brian Hall) writes:
- >
- >Another alternative I suggest you look into is PopupFuncs. It works with
- >Think C 5.0 just fine, and does MPW Pascal, C, C++, and Rez as well. I
- >believe there is a special for users of the ShareWare BBEdit for $30,
-
- BBEdit isn't shareware, it's free.
-
- PopupFuncs and BBEdit work very well together, by design; Eric
- and I collaborated on the low-level interface, so PopupFuncs doesn't require
- any nasty hacking to work seamlessly with BBEdit.
-
- R.
-
-
-
- - --
- - -----------------------------------------------------------------------
- Rich Siegel Internet: siegel@world.std.com
- Software Engineer & Toolsmith
- GCC Technologies
-
- +++++++++++++++++++++++++++
-
- From: michel@cst02.segin.com (Michel Pollet)
- Organization: Groupe Axime
- Date: 7 Jun 92 13:12:29 GMT
-
- francois@welchgate.welch.jhu.edu (Francois Schiettecatte) writes:
- >I have seen a very useful utility for think C 4.0.x called
- >CMarker, it puts an extra icon up on the menu bar of an
- >editing window and allows you to scroll down to functions
- >very quickly. I have not gotten it to work for think C 5.0.x.
- >Does anyone know how I could get it to work with 5.0.x or
- >is there a newer version which does.
-
- There a way around this : Just put the 'right' value in the
- proc id of the document window of Think C with resedit. There
- a little bug in the cmarker's installer. With this trick, I uses
- cmarker on C only (no c++) sources and it seems to work fine.
- I Think that PopupFuncs is the 'new' version of this utility. Right?
-
- Michel
-
-
- - --
- - - Michel Pollet -
- - -- michel@cst02.segin.com (Office), michel@trantor.gna.org (Home) --
- - - Nothing is ever accomplished by a reasonable man. --
-
- +++++++++++++++++++++++++++
-
- From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
- Date: 8 Jun 92 00:35:48 GMT
- Organization: Symantec Corp.
-
- In article <1992Jun6.180626.15917@welchgate.welch.jhu.edu> francois@welchgate.welch.jhu.edu (Francois Schiettecatte) writes:
-
- I have seen a very useful utility for think C 4.0.x called CMarker,
- it puts an extra icon up on the menu bar of an editing window and
- allows you to scroll down to functions very quickly. I have not
- gotten it to work for think C 5.0.x. Does anyone know how I could
- get it to work with 5.0.x or is there a newer version which does.
-
- The newer version of CMarker is a commercial product called "CMaster".
- It has the popup marker menu, along with a *ton* of other neat
- features, including the ability to rebind keys, paren/bracket kissing,
- auto indentation, and more.
-
- CMaster sells for $69 (I think) through direct mail order from Jersey
- Scientific, whose number I have misplaced (sorry!). Drop me an email
- if you need the phone number, I can probably dig it up.
-
- (No relation to Jersey Scientific besides satisfied customer and beta
- tester.)
-
- -phil
- - ----
- Phil Shapiro Software Engineer
- Language Products Group Symantec Corporation
- Internet: phils@cs.brandeis.edu
- - --
- Phil Shapiro Software Engineer
- Language Products Group Symantec Corporation
- Internet: phils@cs.brandeis.edu
-
- +++++++++++++++++++++++++++
-
- From: johnsone@uxh.cso.uiuc.edu (Erik A. Johnson)
- Organization: University of Illinois at Urbana
- Date: Tue, 9 Jun 1992 05:58:14 GMT
-
- francois@welchgate.welch.jhu.edu (Francois Schiettecatte) writes:
- > I have seen a very useful utility for think C 4.0.x called CMarker,
- > it puts an extra icon up on the menu bar of an editing window and
- > allows you to scroll down to functions very quickly. I have not
- > gotten it to work for think C 5.0.x. Does anyone know how I could
- > get it to work with 5.0.x or is there a newer version which does.
-
- phils@chaos.cs.brandeis.edu (Phil Shapiro) responds:
- >The newer version of CMarker is a commercial product called "CMaster".
- >It has the popup marker menu, along with a *ton* of other neat
- >features, including the ability to rebind keys, paren/bracket kissing,
- >auto indentation, and more.
-
- Here's a summary I posted some time ago (March?) of what CMaster does,
- how much it costs, etc. I'll repost it since there may be some interest
- in it.
-
- - -------------------------------------------------------------------------
-
- First of all, CMaster installs (when you install the package) a couple
- of resources into THINK C and modifies two others in order to patch
- itself into THINK C when a project opens (including a new WDEF and a
- couple of code resources). It patches a couple of system routines
- (e.g. GetNextEvent/WaitNextEvent) and a couple of THINK C routines --
- all of this so that CMaster sees Events before THINK C and can modify
- or handle them first. The bulk of CMaster is stored in a file in the
- System Folder, along with a prefs file, and is loaded in as necessary.
-
- Basically, CMaster is an extension to THINK C, adding a number of
- editing capabilities that are (in my opinion) quite useful to the
- programmer.
-
- When you open up a file (source or headers), you get a window that is
- somewhat modified from the standard editor window. There CMaster puts a
- row of clickable icons down the left side of the window (each performs a
- different function -- more on this later), the title bar is modified to have
- one or more popup menus, and one menu (called, not surprisingly, "CMaster")
- is added to the menuBar.
-
- The icons along the left edge of the window perform a number of functions,
- including:
-
- - forward/reverse searches
- - commenting/uncommenting the selected text (or, if a user-definable
- modifier key is pressed, inserting/removing #ifdef/#endif around the
- selected text)
- - multiple clipboards, each of which can be a first-in-first-out stack
- (and can be modifier-clicked to show what is in the clipboard)
- - several markers (allows you to mark a location in your code by clicking
- on the icon and return to it later by clicking in the lower half of the
- icon later -- on a mouseDown for longer than some definable number of
- ticks, this icon will show the context of the mark)
- - produce function prototypes of all of the functions within the current
- selection (or the whole file if no selection), pushing the prototypes
- onto the clipboard for pasting wherever you want
- - scroll the window until the cursor is at the {top,middle,bottom} of the
- screen OR with a modifier key, go to {top,middle,bottom} of the file
- (with command key) or the current function (with option key).
-
- The menus that are available to be put on the window's title bar are:
-
- - C -- the same as the CMaster menu put in the main menubar
- - Actions -- menu equivalents to the icons
- - Markers -- a list of all of the C functions in the file, lines
- beginning with "#pragma mark", and any THINK C 5.0 marks
- (listed in the order in the file, or, with a modifier key,
- in alphabetical order); selecting one of these items jumps
- directly to that function, line or marker
- - Files -- a list of all #included files (don't need a modifier key)
-
- The CMaster menu has several items that put up dialog windows to modify
- CMasters actions, including which icons to show, which menus to use, etc.
- Furthermore, CMaster has user-definable key-equivalents to all of its
- functions and to some of those of THINK C and to some other functions
- (e.g. forward character delete, line join, etc.).
-
- Some other functions that I've gotten very used to having (i.e. I would
- be frustrated if I had to go back to programming without them) are:
-
- - "Kissing" -- when you type a right {parenthesis,bracket,brace},
- CMaster briefly highlights the matching left {parenthesis,bracket,brace}
- or beeping if it cannot find the matching one (this is definable --
- you can turn off any of ')', ']', or '}', and the beeping function).
- - Window location memory using the same resource ('MPSR' # 1005) that
- MPW uses (also includes the position of the scrolling of the file and
- the current selection). CMaster allows you to use, ignore, or
- selectively use this info.
- - CMaster includes a "SnapBack" function -- if you use the Marker menu
- or THINK C's "Find..." to go to another part of your file (such that
- the old selection point is off the screen), then the Enter key will
- SnapBack to your old insertion point.
- - "Animated Thumb" -- the thumb of the scroll-bar allows you to scan
- through the file in real-time as you drag the thumb.
- - THINK C's double-click selects an alphanumeric word. CMaster modifies
- this so that if it is a CONTROL-double-click, it uses more of a C
- oriented definition of "word"; for example, a CONTROL-double-click on
- either "foo" or "bar" of "foo[0]->bar" would select the whole string.
- - a 'vers' editor (it assumes you use the convention of naming your
- project's resource file as projectname.rsrc) to create and modify
- both ID 0 and ID 1 'vers' version resources.
-
-
- Well, this is a summary of CMaster. On a more subjective level, I have
- found it very useful, especially the prototype generator (with THINK C 5.0
- having the option of requiring prototypes, it is WONDERFUL to be able to
- quickly generate the prototypes of all the functions in a source file),
- and the {[(-kissing feature (highlighting the matching left one, beep if
- you forgot to put one in :-). And the Markers menu is invaluable --
- especially in debugging code -- it has saved me much time being able to
- jump directly from one function to another without the necessity of
- searching for functions in long source files.
-
- Oh, the last price I heard was $69.95 (but that was some time ago, so
- don't hold me to it). Address, phone number, etc., for Jersey Scientific:
-
- Jersey Scientific, Inc.
- 545 Eighth Ave., 19th Floor
- New York, NY 10018
-
- (212) 736-0406
- FAX: (212) 947-4981
- e-mail: Applelink: jersci
- Internet: jersci@applelink.apple.com
- Compuserve: 70400,3361
-
- If you send e-mail to them, include your USMail address in your e-mail so
- that they can send you whatever info you need. (Apparently it costs them
- $$$ to send stuff from Applelink.)
-
-
- (Standard disclaimer: I have no connection with Jersey Scientific other than
- being a satisfied CMaster customer. And as for the AAE Dept of UIUC or the
- UIUC in general ... I'm just a grad student ... they hardly know I exist. :-)
-
-
- Erik A. Johnson \ Internet: johnsone@uxh.cso.uiuc.edu \ |
- - ------------------------\ AmericaOnline: ErikAJ \ --+--
- Graduate Student \--------------------------------------------\ |
- Aero/Astro Engineering \ "Jesus said to him, 'I am the way, and \ |
- University of Illinois at \ the truth, and the life; no one comes to \ |
- Urbana-Champaign (UIUC) \ the Father except through me.'" (Jn14:6) \
-
- +++++++++++++++++++++++++++
-
- From: mike@uunet!tellab5!odgate (Mike J. Kelly)
- Date: 8 Jun 92 23:52:13 GMT
- Organization: Odesta Corporation
-
- phils@chaos.cs.brandeis.edu (Phil Shapiro) writes:
-
- >In article <1992Jun6.180626.15917@welchgate.welch.jhu.edu> francois@welchgate.welch.jhu.edu (Francois Schiettecatte) writes:
-
- > I have seen a very useful utility for think C 4.0.x called CMarker,
- > it puts an extra icon up on the menu bar of an editing window and
- > allows you to scroll down to functions very quickly. I have not
- > gotten it to work for think C 5.0.x. Does anyone know how I could
- > get it to work with 5.0.x or is there a newer version which does.
-
- >The newer version of CMarker is a commercial product called "CMaster".
- >It has the popup marker menu, along with a *ton* of other neat
- >features, including the ability to rebind keys, paren/bracket kissing,
- >auto indentation, and more.
-
- >CMaster sells for $69 (I think) through direct mail order from Jersey
- >Scientific, whose number I have misplaced (sorry!). Drop me an email
- >if you need the phone number, I can probably dig it up.
-
- >(No relation to Jersey Scientific besides satisfied customer and beta
- >tester.)
-
- I agree -- Cmaster is a great product, and worth supporting. The price
- is $69.95.
-
- The number is 212-736-0406 or FAX at 212-947-4981.
-
- - --
- - --
- Mike Kelly Odesta Corporation, Northbrook, Illinois, USA
- ...!clout!odgate!mike - Until odesta.com is registered.
- odgate!mike@clout.uucp - From the Internet.
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-